<?php

/**
 * EmailTemplate form.
 *
 * @package    docplus.co.za
 * @subpackage form
 * @author     Fox Matuku
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class EmailTemplateForm extends BaseEmailTemplateForm
{

    public function configure()
    {
        unset(
            $this['created_at'], $this['updated_at']
        );

        $this->validatorSchema['name'] = new sfValidatorString(array('max_length' => 255, 'required' => true), array('required' => 'Your *name* is required.'));
        $this->validatorSchema['subject'] = new sfValidatorString(array('max_length' => 255, 'required' => true), array('required' => 'Your *subject* is required.'));
        $this->validatorSchema['body'] = new sfValidatorString(array('max_length' => 2000, 'required' => true), array('required' => 'Your *body* is required.'));
        $this->validatorSchema['from_email'] = new sfValidatorEmail(array("required" => true), array("invalid" => "Your *from email* is invalid.", "required" => "Your *from email* is required email."));
        $this->validatorSchema['reply_to'] = new sfValidatorEmail(array("required" => true), array("invalid" => "Your *reply to* is invalid.", "required" => "Your *reply to* is required email."));
    }

}
